﻿using System;

namespace UniRx.InternalUtil
{
	// Token: 0x02000218 RID: 536
	internal class SchedulerQueue
	{
		// Token: 0x06000CAB RID: 3243 RVA: 0x0003E090 File Offset: 0x0003C490
		public SchedulerQueue() : this(1024)
		{
		}

		// Token: 0x06000CAC RID: 3244 RVA: 0x0003E09D File Offset: 0x0003C49D
		public SchedulerQueue(int capacity)
		{
			if (capacity < 0)
			{
				throw new ArgumentOutOfRangeException("capacity");
			}
			this._queue = new PriorityQueue<ScheduledItem>(capacity);
		}

		// Token: 0x170000F4 RID: 244
		// (get) Token: 0x06000CAD RID: 3245 RVA: 0x0003E0C3 File Offset: 0x0003C4C3
		public int Count
		{
			get
			{
				return this._queue.Count;
			}
		}

		// Token: 0x06000CAE RID: 3246 RVA: 0x0003E0D0 File Offset: 0x0003C4D0
		public void Enqueue(ScheduledItem scheduledItem)
		{
			this._queue.Enqueue(scheduledItem);
		}

		// Token: 0x06000CAF RID: 3247 RVA: 0x0003E0DE File Offset: 0x0003C4DE
		public bool Remove(ScheduledItem scheduledItem)
		{
			return this._queue.Remove(scheduledItem);
		}

		// Token: 0x06000CB0 RID: 3248 RVA: 0x0003E0EC File Offset: 0x0003C4EC
		public ScheduledItem Dequeue()
		{
			return this._queue.Dequeue();
		}

		// Token: 0x06000CB1 RID: 3249 RVA: 0x0003E0F9 File Offset: 0x0003C4F9
		public ScheduledItem Peek()
		{
			return this._queue.Peek();
		}

		// Token: 0x04000737 RID: 1847
		private readonly PriorityQueue<ScheduledItem> _queue;
	}
}
